<?php
	// Might make a switch_cmd() function for this

	// Antiflood switch
	if (cmd('antiflood', 50)) {
		if (count($msg_args) == 1) {
			reply('Antiflood is ' . ($antifloodswitch ? 'enabled.' : 'disabled.'));
		} else {
			$new = strtolower($msg_args[1]);
			if (($new == 'on') ||	($new == '1') ||	($new == 'enable')) {
				reply('Antiflood is now enabled.');
				$antifloodswitch = true;
			} else if (($new == 'off') ||	($new == '0') ||	($new == 'disable')) {
				$antifloodswitch = false;
				reply('Antiflood is now disabled.');
			}	else {
				reply('Wtf?');
			}
		}
	}
	
	// Debuging switch
	if (cmd('debug', 50)) {
		if (count($msg_args) == 1) {
			reply('Debugging is ' . ($debug ? 'enabled.' : 'disabled.'));
		} else {
			$new = strtolower($msg_args[1]);
			if (($new == 'on') ||	($new == '1') ||	($new == 'enable')) {
				reply('Debugging is now enabled.');
				$debug = true;
			} else if (($new == 'off') ||	($new == '0') ||	($new == 'disable')) {
				$debug = false;
				reply('Debugging is now disabled.');
			}	else {
				reply('Wtf?');
			}
		}
	}
?>
